<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ADC: ADC_Module Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ADC
   &#160;<span id="projectnumber">9.2</span>
   </div>
   <div id="projectbrief">Analog to Digital Conversor library for the Teensy 3.5 microprocessor</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_a_d_c___module.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_a_d_c___module-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ADC_Module Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Implements all functions of the Teensy 3.x, LC, 4.x analog to digital converter.  
 <a href="class_a_d_c___module.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Config</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store the config of the adc.  <a href="struct_a_d_c___module_1_1_a_d_c___config.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac1ebe515d43edd360286c3a3a44db5b8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ac1ebe515d43edd360286c3a3a44db5b8">ADC_Module</a> (uint8_t ADC_number, const uint8_t *const a_channel2sc1a, const ADC_NLIST *const a_diff_table, ADC_REGS_t &amp;a_adc_regs)</td></tr>
<tr class="memdesc:ac1ebe515d43edd360286c3a3a44db5b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pass the <a class="el" href="class_a_d_c.html">ADC</a> number and the Channel number to SC1A number arrays.  <a href="class_a_d_c___module.html#ac1ebe515d43edd360286c3a3a44db5b8">More...</a><br /></td></tr>
<tr class="separator:ac1ebe515d43edd360286c3a3a44db5b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Calibration functions</div></td></tr>
<tr class="memitem:afe8ed6f2a6c811ec3ef2c4aba768982f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#afe8ed6f2a6c811ec3ef2c4aba768982f">recalibrate</a> ()</td></tr>
<tr class="memdesc:afe8ed6f2a6c811ec3ef2c4aba768982f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the calibration sequence, waits until it's done and writes the results.  <a href="class_a_d_c___module.html#afe8ed6f2a6c811ec3ef2c4aba768982f">More...</a><br /></td></tr>
<tr class="separator:afe8ed6f2a6c811ec3ef2c4aba768982f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a037ab0589e2966cd07292c8186cad83e"><td class="memItemLeft" align="right" valign="top"><a id="a037ab0589e2966cd07292c8186cad83e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a037ab0589e2966cd07292c8186cad83e">calibrate</a> ()</td></tr>
<tr class="memdesc:a037ab0589e2966cd07292c8186cad83e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the calibration sequence. <br /></td></tr>
<tr class="separator:a037ab0589e2966cd07292c8186cad83e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a"><td class="memItemLeft" align="right" valign="top"><a id="a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a">wait_for_cal</a> ()</td></tr>
<tr class="memdesc:a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits until calibration is finished and writes the corresponding registers. <br /></td></tr>
<tr class="separator:a4fb69b5b2d07c3fc8f5f0bbbf05dfa2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">ADC settings</div></td></tr>
<tr class="memitem:a784d946712d1d0ee475822b7b8f99ace"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a784d946712d1d0ee475822b7b8f99ace">setReference</a> (<a class="el" href="namespace_a_d_c__settings.html#a5f42fd9e070e88475ec7cee39bbf4f8d">ADC_REFERENCE</a> ref_type)</td></tr>
<tr class="memdesc:a784d946712d1d0ee475822b7b8f99ace"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the voltage reference you prefer, default is vcc.  <a href="class_a_d_c___module.html#a784d946712d1d0ee475822b7b8f99ace">More...</a><br /></td></tr>
<tr class="separator:a784d946712d1d0ee475822b7b8f99ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bd8da02e5e9bd3b2b3db30d5faa3585"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a6bd8da02e5e9bd3b2b3db30d5faa3585">setResolution</a> (uint8_t bits)</td></tr>
<tr class="memdesc:a6bd8da02e5e9bd3b2b3db30d5faa3585"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the resolution of the measurement.  <a href="class_a_d_c___module.html#a6bd8da02e5e9bd3b2b3db30d5faa3585">More...</a><br /></td></tr>
<tr class="separator:a6bd8da02e5e9bd3b2b3db30d5faa3585"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58cabc09d41f6aa25319fd514b47c48f"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a58cabc09d41f6aa25319fd514b47c48f">getResolution</a> ()</td></tr>
<tr class="memdesc:a58cabc09d41f6aa25319fd514b47c48f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the resolution of the <a class="el" href="class_a_d_c___module.html" title="Implements all functions of the Teensy 3.x, LC, 4.x analog to digital converter.">ADC_Module</a>.  <a href="class_a_d_c___module.html#a58cabc09d41f6aa25319fd514b47c48f">More...</a><br /></td></tr>
<tr class="separator:a58cabc09d41f6aa25319fd514b47c48f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3704819ccda64bae9c13a95a74e70a8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af3704819ccda64bae9c13a95a74e70a8">getMaxValue</a> ()</td></tr>
<tr class="memdesc:af3704819ccda64bae9c13a95a74e70a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum value for a measurement: 2^res-1.  <a href="class_a_d_c___module.html#af3704819ccda64bae9c13a95a74e70a8">More...</a><br /></td></tr>
<tr class="separator:af3704819ccda64bae9c13a95a74e70a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a281b4f6ca2705f934bc86b1a25679138"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a281b4f6ca2705f934bc86b1a25679138">setConversionSpeed</a> (<a class="el" href="namespace_a_d_c__settings.html#aab853fc1fcb1992fd5d51408adf7688e">ADC_CONVERSION_SPEED</a> speed)</td></tr>
<tr class="memdesc:a281b4f6ca2705f934bc86b1a25679138"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the conversion speed (changes the <a class="el" href="class_a_d_c.html">ADC</a> clock, ADCK)  <a href="class_a_d_c___module.html#a281b4f6ca2705f934bc86b1a25679138">More...</a><br /></td></tr>
<tr class="separator:a281b4f6ca2705f934bc86b1a25679138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2aa4693c5be479f3189d31f59d212509"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a2aa4693c5be479f3189d31f59d212509">setSamplingSpeed</a> (<a class="el" href="namespace_a_d_c__settings.html#af0d80a1aae7288f77b13f0e01d9da0d3">ADC_SAMPLING_SPEED</a> speed)</td></tr>
<tr class="memdesc:a2aa4693c5be479f3189d31f59d212509"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the sampling speed.  <a href="class_a_d_c___module.html#a2aa4693c5be479f3189d31f59d212509">More...</a><br /></td></tr>
<tr class="separator:a2aa4693c5be479f3189d31f59d212509"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55954618c5c27c1ffce4321e912bac52"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a55954618c5c27c1ffce4321e912bac52">setAveraging</a> (uint8_t num)</td></tr>
<tr class="memdesc:a55954618c5c27c1ffce4321e912bac52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the number of averages.  <a href="class_a_d_c___module.html#a55954618c5c27c1ffce4321e912bac52">More...</a><br /></td></tr>
<tr class="separator:a55954618c5c27c1ffce4321e912bac52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65395dfc2a15bc015e1ee723b22235b5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a65395dfc2a15bc015e1ee723b22235b5">enableInterrupts</a> (void(*isr)(void), uint8_t priority=255)</td></tr>
<tr class="memdesc:a65395dfc2a15bc015e1ee723b22235b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable interrupts.  <a href="class_a_d_c___module.html#a65395dfc2a15bc015e1ee723b22235b5">More...</a><br /></td></tr>
<tr class="separator:a65395dfc2a15bc015e1ee723b22235b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4509062644982526fee3c02e0b528fc"><td class="memItemLeft" align="right" valign="top"><a id="aa4509062644982526fee3c02e0b528fc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aa4509062644982526fee3c02e0b528fc">disableInterrupts</a> ()</td></tr>
<tr class="memdesc:aa4509062644982526fee3c02e0b528fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable interrupts. <br /></td></tr>
<tr class="separator:aa4509062644982526fee3c02e0b528fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3d14c01b1442c0c34b5dbc9a6e49f35"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af3d14c01b1442c0c34b5dbc9a6e49f35">enableDMA</a> ()</td></tr>
<tr class="memdesc:af3d14c01b1442c0c34b5dbc9a6e49f35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable DMA request.  <a href="class_a_d_c___module.html#af3d14c01b1442c0c34b5dbc9a6e49f35">More...</a><br /></td></tr>
<tr class="separator:af3d14c01b1442c0c34b5dbc9a6e49f35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1610dcab46476f287c2dd4d96465c47"><td class="memItemLeft" align="right" valign="top"><a id="ac1610dcab46476f287c2dd4d96465c47"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ac1610dcab46476f287c2dd4d96465c47">disableDMA</a> ()</td></tr>
<tr class="memdesc:ac1610dcab46476f287c2dd4d96465c47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable <a class="el" href="class_a_d_c.html">ADC</a> DMA request. <br /></td></tr>
<tr class="separator:ac1610dcab46476f287c2dd4d96465c47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7a632267f21b79c31c1dae56b5da188"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ae7a632267f21b79c31c1dae56b5da188">enableCompare</a> (int16_t compValue, bool greaterThan)</td></tr>
<tr class="memdesc:ae7a632267f21b79c31c1dae56b5da188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the compare function to a single value.  <a href="class_a_d_c___module.html#ae7a632267f21b79c31c1dae56b5da188">More...</a><br /></td></tr>
<tr class="separator:ae7a632267f21b79c31c1dae56b5da188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8e64bab9d4e7f1935a260629e5d71d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ab8e64bab9d4e7f1935a260629e5d71d5">enableCompareRange</a> (int16_t lowerLimit, int16_t upperLimit, bool insideRange, bool inclusive)</td></tr>
<tr class="memdesc:ab8e64bab9d4e7f1935a260629e5d71d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the compare function to a range.  <a href="class_a_d_c___module.html#ab8e64bab9d4e7f1935a260629e5d71d5">More...</a><br /></td></tr>
<tr class="separator:ab8e64bab9d4e7f1935a260629e5d71d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac635f675a9690a4db016c73c31818262"><td class="memItemLeft" align="right" valign="top"><a id="ac635f675a9690a4db016c73c31818262"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ac635f675a9690a4db016c73c31818262">disableCompare</a> ()</td></tr>
<tr class="memdesc:ac635f675a9690a4db016c73c31818262"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the compare function. <br /></td></tr>
<tr class="separator:ac635f675a9690a4db016c73c31818262"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b00e0669bbc7917544d4e2e543f1a27"><td class="memItemLeft" align="right" valign="top"><a id="a8b00e0669bbc7917544d4e2e543f1a27"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a8b00e0669bbc7917544d4e2e543f1a27">continuousMode</a> ()</td></tr>
<tr class="memdesc:a8b00e0669bbc7917544d4e2e543f1a27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set continuous conversion mode. <br /></td></tr>
<tr class="separator:a8b00e0669bbc7917544d4e2e543f1a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f7d83ced9a5159b1f25bd998cea2bd0"><td class="memItemLeft" align="right" valign="top"><a id="a0f7d83ced9a5159b1f25bd998cea2bd0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a0f7d83ced9a5159b1f25bd998cea2bd0">singleMode</a> ()</td></tr>
<tr class="memdesc:a0f7d83ced9a5159b1f25bd998cea2bd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set single-shot conversion mode. <br /></td></tr>
<tr class="separator:a0f7d83ced9a5159b1f25bd998cea2bd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7edf0189517f42a2bcbc389c116d9f58"><td class="memItemLeft" align="right" valign="top"><a id="a7edf0189517f42a2bcbc389c116d9f58"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a7edf0189517f42a2bcbc389c116d9f58">singleEndedMode</a> ()</td></tr>
<tr class="memdesc:a7edf0189517f42a2bcbc389c116d9f58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set single-ended conversion mode. <br /></td></tr>
<tr class="separator:a7edf0189517f42a2bcbc389c116d9f58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaba2c3f43e9c702a873da6539b3d25f"><td class="memItemLeft" align="right" valign="top"><a id="adaba2c3f43e9c702a873da6539b3d25f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#adaba2c3f43e9c702a873da6539b3d25f">differentialMode</a> ()</td></tr>
<tr class="memdesc:adaba2c3f43e9c702a873da6539b3d25f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set differential conversion mode. <br /></td></tr>
<tr class="separator:adaba2c3f43e9c702a873da6539b3d25f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f8137bfcdc459b4f8767ad46f325af6"><td class="memItemLeft" align="right" valign="top"><a id="a4f8137bfcdc459b4f8767ad46f325af6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a4f8137bfcdc459b4f8767ad46f325af6">setSoftwareTrigger</a> ()</td></tr>
<tr class="memdesc:a4f8137bfcdc459b4f8767ad46f325af6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use software to trigger the <a class="el" href="class_a_d_c.html">ADC</a>, this is the most common setting. <br /></td></tr>
<tr class="separator:a4f8137bfcdc459b4f8767ad46f325af6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5f004d8433dc5968af0ec7f17b1f576"><td class="memItemLeft" align="right" valign="top"><a id="aa5f004d8433dc5968af0ec7f17b1f576"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aa5f004d8433dc5968af0ec7f17b1f576">setHardwareTrigger</a> ()</td></tr>
<tr class="memdesc:aa5f004d8433dc5968af0ec7f17b1f576"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use hardware to trigger the <a class="el" href="class_a_d_c.html">ADC</a>. <br /></td></tr>
<tr class="separator:aa5f004d8433dc5968af0ec7f17b1f576"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">State of the ADC</div></td></tr>
<tr class="memitem:a9facd614ff4fec667341d9109f098f0f"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a9facd614ff4fec667341d9109f098f0f">isConverting</a> ()</td></tr>
<tr class="memdesc:a9facd614ff4fec667341d9109f098f0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> converting at the moment?  <a href="class_a_d_c___module.html#a9facd614ff4fec667341d9109f098f0f">More...</a><br /></td></tr>
<tr class="separator:a9facd614ff4fec667341d9109f098f0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aefadc245d1582d3ae97e1b9c7acac8"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a3aefadc245d1582d3ae97e1b9c7acac8">isComplete</a> ()</td></tr>
<tr class="memdesc:a3aefadc245d1582d3ae97e1b9c7acac8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is an <a class="el" href="class_a_d_c.html">ADC</a> conversion ready?  <a href="class_a_d_c___module.html#a3aefadc245d1582d3ae97e1b9c7acac8">More...</a><br /></td></tr>
<tr class="separator:a3aefadc245d1582d3ae97e1b9c7acac8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f6124f3fee4cae59f011184525822a6"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a4f6124f3fee4cae59f011184525822a6">isDifferential</a> ()</td></tr>
<tr class="memdesc:a4f6124f3fee4cae59f011184525822a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> in differential mode?  <a href="class_a_d_c___module.html#a4f6124f3fee4cae59f011184525822a6">More...</a><br /></td></tr>
<tr class="separator:a4f6124f3fee4cae59f011184525822a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a038874878778ef351e45f902fcee47df"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a038874878778ef351e45f902fcee47df">isContinuous</a> ()</td></tr>
<tr class="memdesc:a038874878778ef351e45f902fcee47df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> in continuous mode?  <a href="class_a_d_c___module.html#a038874878778ef351e45f902fcee47df">More...</a><br /></td></tr>
<tr class="separator:a038874878778ef351e45f902fcee47df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Valid pins</div></td></tr>
<tr class="memitem:a9fd95a61d263a9d82918b50e81aee2e9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a9fd95a61d263a9d82918b50e81aee2e9">checkPin</a> (uint8_t pin)</td></tr>
<tr class="memdesc:a9fd95a61d263a9d82918b50e81aee2e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the pin is a valid analog pin.  <a href="class_a_d_c___module.html#a9fd95a61d263a9d82918b50e81aee2e9">More...</a><br /></td></tr>
<tr class="separator:a9fd95a61d263a9d82918b50e81aee2e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80d29662a1a32a51fec606351685ebaf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a80d29662a1a32a51fec606351685ebaf">checkDifferentialPins</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:a80d29662a1a32a51fec606351685ebaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the pins are a valid analog differential pair of pins.  <a href="class_a_d_c___module.html#a80d29662a1a32a51fec606351685ebaf">More...</a><br /></td></tr>
<tr class="separator:a80d29662a1a32a51fec606351685ebaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Conversion helper methods</div></td></tr>
<tr class="memitem:a33cc7fbfcb158a33e8ca276cc7b309b5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a33cc7fbfcb158a33e8ca276cc7b309b5">startReadFast</a> (uint8_t pin)</td></tr>
<tr class="memdesc:a33cc7fbfcb158a33e8ca276cc7b309b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a single-ended conversion on the pin.  <a href="class_a_d_c___module.html#a33cc7fbfcb158a33e8ca276cc7b309b5">More...</a><br /></td></tr>
<tr class="separator:a33cc7fbfcb158a33e8ca276cc7b309b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa503b484e691fe31172033fc928576bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aa503b484e691fe31172033fc928576bd">startDifferentialFast</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:aa503b484e691fe31172033fc928576bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a differential conversion on the pair of pins.  <a href="class_a_d_c___module.html#aa503b484e691fe31172033fc928576bd">More...</a><br /></td></tr>
<tr class="separator:aa503b484e691fe31172033fc928576bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Blocking conversion methods</div></td></tr>
<tr class="memitem:ad492adad4a9fa728625be82602bf1672"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ad492adad4a9fa728625be82602bf1672">analogRead</a> (uint8_t pin)</td></tr>
<tr class="memdesc:ad492adad4a9fa728625be82602bf1672"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the analog value of the pin.  <a href="class_a_d_c___module.html#ad492adad4a9fa728625be82602bf1672">More...</a><br /></td></tr>
<tr class="separator:ad492adad4a9fa728625be82602bf1672"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6eaddace77e00a063abeb7331fae6abe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a6eaddace77e00a063abeb7331fae6abe">analogRead</a> (<a class="el" href="namespace_a_d_c__settings.html#a8c2a64f3fca3ac6b82e8df8cf44f6ca2">ADC_INTERNAL_SOURCE</a> pin)</td></tr>
<tr class="memdesc:a6eaddace77e00a063abeb7331fae6abe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the analog value of the special internal source, such as the temperature sensor.  <a href="class_a_d_c___module.html#a6eaddace77e00a063abeb7331fae6abe">More...</a><br /></td></tr>
<tr class="separator:a6eaddace77e00a063abeb7331fae6abe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a57f6a9b0e3884f3862062b33f1a447"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a4a57f6a9b0e3884f3862062b33f1a447">analogReadDifferential</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:a4a57f6a9b0e3884f3862062b33f1a447"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the differential analog value of two pins (pinP - pinN).  <a href="class_a_d_c___module.html#a4a57f6a9b0e3884f3862062b33f1a447">More...</a><br /></td></tr>
<tr class="separator:a4a57f6a9b0e3884f3862062b33f1a447"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Non-blocking conversion methods</div></td></tr>
<tr class="memitem:af8a13facb0c15ef14e527a37f2386ce5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af8a13facb0c15ef14e527a37f2386ce5">startSingleRead</a> (uint8_t pin)</td></tr>
<tr class="memdesc:af8a13facb0c15ef14e527a37f2386ce5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts an analog measurement on the pin. It returns immediately, get value with <a class="el" href="class_a_d_c___module.html#a60d0edc82fd1dbb2e20d090a53718ce2">readSingle()</a>. If this function interrupts a measurement, it stores the settings in adc_config.  <a href="class_a_d_c___module.html#af8a13facb0c15ef14e527a37f2386ce5">More...</a><br /></td></tr>
<tr class="separator:af8a13facb0c15ef14e527a37f2386ce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe85ed1855a09f18c5d2026cf08968a7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#abe85ed1855a09f18c5d2026cf08968a7">startSingleDifferential</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:abe85ed1855a09f18c5d2026cf08968a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a differential conversion between two pins (pinP - pinN) It returns immediately, get value with <a class="el" href="class_a_d_c___module.html#a60d0edc82fd1dbb2e20d090a53718ce2">readSingle()</a>. If this function interrupts a measurement, it stores the settings in adc_config.  <a href="class_a_d_c___module.html#abe85ed1855a09f18c5d2026cf08968a7">More...</a><br /></td></tr>
<tr class="separator:abe85ed1855a09f18c5d2026cf08968a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60d0edc82fd1dbb2e20d090a53718ce2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a60d0edc82fd1dbb2e20d090a53718ce2">readSingle</a> ()</td></tr>
<tr class="memdesc:a60d0edc82fd1dbb2e20d090a53718ce2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the analog value of a single conversion. Set the conversion with with <a class="el" href="class_a_d_c___module.html#af8a13facb0c15ef14e527a37f2386ce5">startSingleRead(uint8_t pin)</a> or <a class="el" href="class_a_d_c___module.html#abe85ed1855a09f18c5d2026cf08968a7" title="Start a differential conversion between two pins (pinP - pinN) It returns immediately,...">startSingleDifferential(uint8_t pinP, uint8_t pinN)</a>.  <a href="class_a_d_c___module.html#a60d0edc82fd1dbb2e20d090a53718ce2">More...</a><br /></td></tr>
<tr class="separator:a60d0edc82fd1dbb2e20d090a53718ce2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Continuous conversion methods</div></td></tr>
<tr class="memitem:a2b6284a613c9d3e452d2fc708bf6ce98"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a2b6284a613c9d3e452d2fc708bf6ce98">startContinuous</a> (uint8_t pin)</td></tr>
<tr class="memdesc:a2b6284a613c9d3e452d2fc708bf6ce98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts continuous conversion on the pin.  <a href="class_a_d_c___module.html#a2b6284a613c9d3e452d2fc708bf6ce98">More...</a><br /></td></tr>
<tr class="separator:a2b6284a613c9d3e452d2fc708bf6ce98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23fd4fa6b759dcc0c029b3266f6a5fb7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a23fd4fa6b759dcc0c029b3266f6a5fb7">startContinuousDifferential</a> (uint8_t pinP, uint8_t pinN)</td></tr>
<tr class="memdesc:a23fd4fa6b759dcc0c029b3266f6a5fb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts continuous conversion between the pins (pinP-pinN).  <a href="class_a_d_c___module.html#a23fd4fa6b759dcc0c029b3266f6a5fb7">More...</a><br /></td></tr>
<tr class="separator:a23fd4fa6b759dcc0c029b3266f6a5fb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bddd248a9d52110b923fa94438f7f0a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a8bddd248a9d52110b923fa94438f7f0a">analogReadContinuous</a> ()</td></tr>
<tr class="memdesc:a8bddd248a9d52110b923fa94438f7f0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the analog value of a continuous conversion.  <a href="class_a_d_c___module.html#a8bddd248a9d52110b923fa94438f7f0a">More...</a><br /></td></tr>
<tr class="separator:a8bddd248a9d52110b923fa94438f7f0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9af29f865bdd376d954112d36b0992f0"><td class="memItemLeft" align="right" valign="top"><a id="a9af29f865bdd376d954112d36b0992f0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a9af29f865bdd376d954112d36b0992f0">stopContinuous</a> ()</td></tr>
<tr class="memdesc:a9af29f865bdd376d954112d36b0992f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops continuous conversion. <br /></td></tr>
<tr class="separator:a9af29f865bdd376d954112d36b0992f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Frequency trigger methods</div></td></tr>
<tr class="memitem:aebdd7b54f91fe0834321fb632177151e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#aebdd7b54f91fe0834321fb632177151e">startTimer</a> (uint32_t freq)</td></tr>
<tr class="memdesc:aebdd7b54f91fe0834321fb632177151e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the default timer (PDB) triggering the <a class="el" href="class_a_d_c.html">ADC</a> at the frequency.  <a href="class_a_d_c___module.html#aebdd7b54f91fe0834321fb632177151e">More...</a><br /></td></tr>
<tr class="separator:aebdd7b54f91fe0834321fb632177151e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acced2e2266868323ff2c53df96791a15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#acced2e2266868323ff2c53df96791a15">startPDB</a> (uint32_t freq)</td></tr>
<tr class="memdesc:acced2e2266868323ff2c53df96791a15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start PDB triggering the <a class="el" href="class_a_d_c.html">ADC</a> at the frequency.  <a href="class_a_d_c___module.html#acced2e2266868323ff2c53df96791a15">More...</a><br /></td></tr>
<tr class="separator:acced2e2266868323ff2c53df96791a15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4361eec1c9f93a99661afb1a43d15284"><td class="memItemLeft" align="right" valign="top"><a id="a4361eec1c9f93a99661afb1a43d15284"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a4361eec1c9f93a99661afb1a43d15284">stopTimer</a> ()</td></tr>
<tr class="memdesc:a4361eec1c9f93a99661afb1a43d15284"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop the default timer (PDB) <br /></td></tr>
<tr class="separator:a4361eec1c9f93a99661afb1a43d15284"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25eb12b50ef1002100ac6cd865cc6dc"><td class="memItemLeft" align="right" valign="top"><a id="ab25eb12b50ef1002100ac6cd865cc6dc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ab25eb12b50ef1002100ac6cd865cc6dc">stopPDB</a> ()</td></tr>
<tr class="memdesc:ab25eb12b50ef1002100ac6cd865cc6dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop the PDB. <br /></td></tr>
<tr class="separator:ab25eb12b50ef1002100ac6cd865cc6dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3c47b374f4f68eb815812c6a373e439"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ae3c47b374f4f68eb815812c6a373e439">getTimerFrequency</a> ()</td></tr>
<tr class="memdesc:ae3c47b374f4f68eb815812c6a373e439"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the default timer's (PDB) frequency.  <a href="class_a_d_c___module.html#ae3c47b374f4f68eb815812c6a373e439">More...</a><br /></td></tr>
<tr class="separator:ae3c47b374f4f68eb815812c6a373e439"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae113f4168d9dd343f66ecc6e59a245f6"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#ae113f4168d9dd343f66ecc6e59a245f6">getPDBFrequency</a> ()</td></tr>
<tr class="memdesc:ae113f4168d9dd343f66ecc6e59a245f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the PDB's frequency.  <a href="class_a_d_c___module.html#ae113f4168d9dd343f66ecc6e59a245f6">More...</a><br /></td></tr>
<tr class="separator:ae113f4168d9dd343f66ecc6e59a245f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Other methods and variables</h2></td></tr>
<tr class="memitem:afcb1d826e94dad49e376bf3fe0334c39"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Module::ADC_Config</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#afcb1d826e94dad49e376bf3fe0334c39">adc_config</a></td></tr>
<tr class="separator:afcb1d826e94dad49e376bf3fe0334c39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34f6f7878889aa3644b279f9440dc0bf"><td class="memItemLeft" align="right" valign="top"><a id="a34f6f7878889aa3644b279f9440dc0bf"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a34f6f7878889aa3644b279f9440dc0bf">adcWasInUse</a></td></tr>
<tr class="memdesc:a34f6f7878889aa3644b279f9440dc0bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Was the adc in use before a call? <br /></td></tr>
<tr class="separator:a34f6f7878889aa3644b279f9440dc0bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27fdc83a7dbe3a8c8c24fc4273414256"><td class="memItemLeft" align="right" valign="top"><a id="a27fdc83a7dbe3a8c8c24fc4273414256"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a27fdc83a7dbe3a8c8c24fc4273414256">num_measurements</a></td></tr>
<tr class="memdesc:a27fdc83a7dbe3a8c8c24fc4273414256"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of measurements that the <a class="el" href="class_a_d_c.html">ADC</a> is performing. <br /></td></tr>
<tr class="separator:a27fdc83a7dbe3a8c8c24fc4273414256"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d0cc3360073881658e578faf4ae5632"><td class="memItemLeft" align="right" valign="top">volatile ADC_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a2d0cc3360073881658e578faf4ae5632">fail_flag</a></td></tr>
<tr class="memdesc:a2d0cc3360073881658e578faf4ae5632"><td class="mdescLeft">&#160;</td><td class="mdescRight">This flag indicates that some kind of error took place.  <a href="class_a_d_c___module.html#a2d0cc3360073881658e578faf4ae5632">More...</a><br /></td></tr>
<tr class="separator:a2d0cc3360073881658e578faf4ae5632"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29c327df90f71838a36efd3c3b68dd8c"><td class="memItemLeft" align="right" valign="top"><a id="a29c327df90f71838a36efd3c3b68dd8c"></a>
const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a29c327df90f71838a36efd3c3b68dd8c">ADC_num</a></td></tr>
<tr class="memdesc:a29c327df90f71838a36efd3c3b68dd8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Which adc is this? <br /></td></tr>
<tr class="separator:a29c327df90f71838a36efd3c3b68dd8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2ee5bc5b76647506e597c178c9691d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#af2ee5bc5b76647506e597c178c9691d3">saveConfig</a> (<a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Config</a> *config)</td></tr>
<tr class="separator:af2ee5bc5b76647506e597c178c9691d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bb50f669bbc41937fb5157abe2050ca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#a1bb50f669bbc41937fb5157abe2050ca">loadConfig</a> (const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Config</a> *config)</td></tr>
<tr class="separator:a1bb50f669bbc41937fb5157abe2050ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf980784cf468d28fc2cbb94d06be500"><td class="memItemLeft" align="right" valign="top"><a id="abf980784cf468d28fc2cbb94d06be500"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c___module.html#abf980784cf468d28fc2cbb94d06be500">resetError</a> ()</td></tr>
<tr class="memdesc:abf980784cf468d28fc2cbb94d06be500"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets all errors from the <a class="el" href="class_a_d_c.html">ADC</a>, if any. <br /></td></tr>
<tr class="separator:abf980784cf468d28fc2cbb94d06be500"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implements all functions of the Teensy 3.x, LC, 4.x analog to digital converter. </p>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00054">54</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac1ebe515d43edd360286c3a3a44db5b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1ebe515d43edd360286c3a3a44db5b8">&#9670;&nbsp;</a></span>ADC_Module()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ADC_Module::ADC_Module </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ADC_number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *const&#160;</td>
          <td class="paramname"><em>a_channel2sc1a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ADC_NLIST *const&#160;</td>
          <td class="paramname"><em>a_diff_table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ADC_REGS_t &amp;&#160;</td>
          <td class="paramname"><em>a_adc_regs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pass the <a class="el" href="class_a_d_c.html">ADC</a> number and the Channel number to SC1A number arrays. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ADC_number</td><td>Number of the <a class="el" href="class_a_d_c.html">ADC</a> module, from 0. </td></tr>
    <tr><td class="paramname">a_channel2sc1a</td><td>contains an index that pairs each pin to its SC1A number (used to start a conversion on that pin) </td></tr>
    <tr><td class="paramname">a_diff_table</td><td>is similar to a_channel2sc1a, but for differential pins. </td></tr>
    <tr><td class="paramname">a_adc_regs</td><td>pointer to start of the <a class="el" href="class_a_d_c.html">ADC</a> registers </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00042">42</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6eaddace77e00a063abeb7331fae6abe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6eaddace77e00a063abeb7331fae6abe">&#9670;&nbsp;</a></span>analogRead() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::analogRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_a_d_c__settings.html#a8c2a64f3fca3ac6b82e8df8cf44f6ca2">ADC_INTERNAL_SOURCE</a>&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the analog value of the special internal source, such as the temperature sensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td><a class="el" href="namespace_a_d_c__settings.html#a8c2a64f3fca3ac6b82e8df8cf44f6ca2">ADC_INTERNAL_SOURCE</a> to read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the analog value of the pin. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00459">459</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="ad492adad4a9fa728625be82602bf1672"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad492adad4a9fa728625be82602bf1672">&#9670;&nbsp;</a></span>analogRead() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::analogRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the analog value of the pin. </p>
<p>It waits until the value is read and then returns the result. If a comparison has been set up and fails, it will return ADC_ERROR_VALUE. This function is interrupt safe, so it will restore the adc to the state it was before being called </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>pin to read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the analog value of the pin. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01104">1104</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a8bddd248a9d52110b923fa94438f7f0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8bddd248a9d52110b923fa94438f7f0a">&#9670;&nbsp;</a></span>analogReadContinuous()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::analogReadContinuous </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reads the analog value of a continuous conversion. </p>
<p>If single-ended and 16 bits it's necessary to typecast it to an unsigned type (like uint16_t), otherwise values larger than 3.3/2 V are interpreted as negative!</p>
<p>Set the continuous conversion with with <a class="el" href="class_a_d_c___module.html#a2b6284a613c9d3e452d2fc708bf6ce98">startContinuous(uint8_t pin)</a> or <a class="el" href="class_a_d_c___module.html#a23fd4fa6b759dcc0c029b3266f6a5fb7" title="Starts continuous conversion between the pins (pinP-pinN).">startContinuousDifferential(uint8_t pinP, uint8_t pinN)</a> (if exists). </p><dl class="section return"><dt>Returns</dt><dd>the last converted value. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00563">563</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="a4a57f6a9b0e3884f3862062b33f1a447"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a57f6a9b0e3884f3862062b33f1a447">&#9670;&nbsp;</a></span>analogReadDifferential()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::analogReadDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the differential analog value of two pins (pinP - pinN). </p>
<p>It waits until the value is read and then returns the result. If a comparison has been set up and fails, it will return ADC_ERROR_DIFF_VALUE.</p>
<p>This function is interrupt safe, so it will restore the adc to the state it was before being called </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the difference between the pins if they are valid, othewise returns ADC_ERROR_DIFF_VALUE. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01185">1185</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a80d29662a1a32a51fec606351685ebaf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80d29662a1a32a51fec606351685ebaf">&#9670;&nbsp;</a></span>checkDifferentialPins()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::checkDifferentialPins </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check whether the pins are a valid analog differential pair of pins. </p>
<p>If PGA is enabled it also checks that this ADCx can use PGA on this pins </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>positive pin to check. </td></tr>
    <tr><td class="paramname">pinN</td><td>negative pin to check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the pin is valid, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00991">991</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a9fd95a61d263a9d82918b50e81aee2e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9fd95a61d263a9d82918b50e81aee2e9">&#9670;&nbsp;</a></span>checkPin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::checkPin </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check whether the pin is a valid analog pin. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>to check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the pin is valid, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00969">969</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="ae7a632267f21b79c31c1dae56b5da188"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7a632267f21b79c31c1dae56b5da188">&#9670;&nbsp;</a></span>enableCompare()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enableCompare </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>compValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>greaterThan</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable the compare function to a single value. </p>
<p>A conversion will be completed only when the <a class="el" href="class_a_d_c.html">ADC</a> value is &gt;= compValue (greaterThan=1) or &lt; compValue (greaterThan=0)</p>
<p>Call it after changing the resolution. Use with interrupts or poll conversion completion with <a class="el" href="class_a_d_c___module.html#a3aefadc245d1582d3ae97e1b9c7acac8">isComplete()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">compValue</td><td>value to compare </td></tr>
    <tr><td class="paramname">greaterThan</td><td>true or false </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00798">798</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="ab8e64bab9d4e7f1935a260629e5d71d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8e64bab9d4e7f1935a260629e5d71d5">&#9670;&nbsp;</a></span>enableCompareRange()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enableCompareRange </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>lowerLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>upperLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>insideRange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>inclusive</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable the compare function to a range. </p>
<p>A conversion will be completed only when the <a class="el" href="class_a_d_c.html">ADC</a> value is inside (insideRange=1) or outside (=0) the range given by (lowerLimit, upperLimit), including (inclusive=1) the limits or not (inclusive=0).</p>
<p>See Table 31-78, p. 617 of the freescale manual. Call it after changing the resolution. Use with interrupts or poll conversion completion with <a class="el" href="class_a_d_c___module.html#a3aefadc245d1582d3ae97e1b9c7acac8">isComplete()</a> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lowerLimit</td><td>lower value to compare </td></tr>
    <tr><td class="paramname">upperLimit</td><td>upper value to compare </td></tr>
    <tr><td class="paramname">insideRange</td><td>true or false </td></tr>
    <tr><td class="paramname">inclusive</td><td>true or false </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00824">824</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="af3d14c01b1442c0c34b5dbc9a6e49f35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3d14c01b1442c0c34b5dbc9a6e49f35">&#9670;&nbsp;</a></span>enableDMA()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enableDMA </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable DMA request. </p>
<p>An <a class="el" href="class_a_d_c.html">ADC</a> DMA request will be raised when the conversion is completed (including hardware averages and if the comparison (if any) is true). </p>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00764">764</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a65395dfc2a15bc015e1ee723b22235b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65395dfc2a15bc015e1ee723b22235b5">&#9670;&nbsp;</a></span>enableInterrupts()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::enableInterrupts </td>
          <td>(</td>
          <td class="paramtype">void(*)(void)&#160;</td>
          <td class="paramname"><em>isr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>priority</em> = <code>255</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable interrupts. </p>
<p>An IRQ_ADCx interrupt will be raised when the conversion is completed (including hardware averages and if the comparison (if any) is true). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">isr</td><td>function (returns void and accepts no arguments) that will be executed after an interrupt. </td></tr>
    <tr><td class="paramname">priority</td><td>Interrupt priority, highest is 0, lowest is 255. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00726">726</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="af3704819ccda64bae9c13a95a74e70a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3704819ccda64bae9c13a95a74e70a8">&#9670;&nbsp;</a></span>getMaxValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADC_Module::getMaxValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the maximum value for a measurement: 2^res-1. </p>
<dl class="section return"><dt>Returns</dt><dd>the maximum value for a measurement: 2^res-1. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00416">416</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="ae113f4168d9dd343f66ecc6e59a245f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae113f4168d9dd343f66ecc6e59a245f6">&#9670;&nbsp;</a></span>getPDBFrequency()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADC_Module::getPDBFrequency </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the PDB's frequency. </p>
<p>Return the PDB's frequency </p><dl class="section return"><dt>Returns</dt><dd>the timer's frequency in Hz. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01601">1601</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a58cabc09d41f6aa25319fd514b47c48f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58cabc09d41f6aa25319fd514b47c48f">&#9670;&nbsp;</a></span>getResolution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ADC_Module::getResolution </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the resolution of the <a class="el" href="class_a_d_c___module.html" title="Implements all functions of the Teensy 3.x, LC, 4.x analog to digital converter.">ADC_Module</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>the resolution of the <a class="el" href="class_a_d_c___module.html" title="Implements all functions of the Teensy 3.x, LC, 4.x analog to digital converter.">ADC_Module</a>. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00408">408</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="ae3c47b374f4f68eb815812c6a373e439"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3c47b374f4f68eb815812c6a373e439">&#9670;&nbsp;</a></span>getTimerFrequency()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADC_Module::getTimerFrequency </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the default timer's (PDB) frequency. </p>
<p>The default timer in this board is the PDB, you can also call it directly with <a class="el" href="class_a_d_c___module.html#ae113f4168d9dd343f66ecc6e59a245f6" title="Return the PDB&#39;s frequency.">getPDBFrequency()</a>. </p><dl class="section return"><dt>Returns</dt><dd>the timer's frequency in Hz. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00618">618</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="a3aefadc245d1582d3ae97e1b9c7acac8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3aefadc245d1582d3ae97e1b9c7acac8">&#9670;&nbsp;</a></span>isComplete()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool ADC_Module::isComplete </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is an <a class="el" href="class_a_d_c.html">ADC</a> conversion ready? </p>
<p>When a value is read this function returns false until a new value exists, so it only makes sense to call it before <a class="el" href="class_a_d_c___module.html#a8bddd248a9d52110b923fa94438f7f0a">analogReadContinuous()</a> or <a class="el" href="class_a_d_c___module.html#a60d0edc82fd1dbb2e20d090a53718ce2">readSingle()</a> </p><dl class="section return"><dt>Returns</dt><dd>true if yes, false if not. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00340">340</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="a038874878778ef351e45f902fcee47df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a038874878778ef351e45f902fcee47df">&#9670;&nbsp;</a></span>isContinuous()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool ADC_Module::isContinuous </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is the <a class="el" href="class_a_d_c.html">ADC</a> in continuous mode? </p>
<dl class="section return"><dt>Returns</dt><dd>true or false </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00362">362</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="a9facd614ff4fec667341d9109f098f0f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9facd614ff4fec667341d9109f098f0f">&#9670;&nbsp;</a></span>isConverting()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool ADC_Module::isConverting </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is the <a class="el" href="class_a_d_c.html">ADC</a> converting at the moment? </p>
<dl class="section return"><dt>Returns</dt><dd>true or false </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00323">323</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="a4f6124f3fee4cae59f011184525822a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f6124f3fee4cae59f011184525822a6">&#9670;&nbsp;</a></span>isDifferential()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool ADC_Module::isDifferential </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is the <a class="el" href="class_a_d_c.html">ADC</a> in differential mode? </p>
<dl class="section return"><dt>Returns</dt><dd>true or false </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00353">353</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="a1bb50f669bbc41937fb5157abe2050ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1bb50f669bbc41937fb5157abe2050ca">&#9670;&nbsp;</a></span>loadConfig()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::loadConfig </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Config</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Load config to the <a class="el" href="class_a_d_c.html">ADC</a> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td><a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html" title="Store the config of the adc.">ADC_Config</a> from where the config will be loaded </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00714">714</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="a60d0edc82fd1dbb2e20d090a53718ce2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60d0edc82fd1dbb2e20d090a53718ce2">&#9670;&nbsp;</a></span>readSingle()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ADC_Module::readSingle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reads the analog value of a single conversion. Set the conversion with with <a class="el" href="class_a_d_c___module.html#af8a13facb0c15ef14e527a37f2386ce5">startSingleRead(uint8_t pin)</a> or <a class="el" href="class_a_d_c___module.html#abe85ed1855a09f18c5d2026cf08968a7" title="Start a differential conversion between two pins (pinP - pinN) It returns immediately,...">startSingleDifferential(uint8_t pinP, uint8_t pinN)</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>the converted value. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00517">517</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="afe8ed6f2a6c811ec3ef2c4aba768982f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe8ed6f2a6c811ec3ef2c4aba768982f">&#9670;&nbsp;</a></span>recalibrate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::recalibrate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the calibration sequence, waits until it's done and writes the results. </p>
<p>Usually it's not necessary to call this function directly, but do it if the "environment" changed significantly since the program was started. </p>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00244">244</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="af2ee5bc5b76647506e597c178c9691d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2ee5bc5b76647506e597c178c9691d3">&#9670;&nbsp;</a></span>saveConfig()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::saveConfig </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Config</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Save config of the <a class="el" href="class_a_d_c.html">ADC</a> to the <a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html" title="Store the config of the adc.">ADC_Config</a> struct </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td><a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html" title="Store the config of the adc.">ADC_Config</a> where the config will be stored </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00696">696</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<a id="a55954618c5c27c1ffce4321e912bac52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55954618c5c27c1ffce4321e912bac52">&#9670;&nbsp;</a></span>setAveraging()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setAveraging </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the number of averages. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>can be 0, 4, 8, 16 or 32.</td></tr>
  </table>
  </dd>
</dl>
<p>It doesn't recalibrate at the end. </p>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00651">651</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a281b4f6ca2705f934bc86b1a25679138"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a281b4f6ca2705f934bc86b1a25679138">&#9670;&nbsp;</a></span>setConversionSpeed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setConversionSpeed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_a_d_c__settings.html#aab853fc1fcb1992fd5d51408adf7688e">ADC_CONVERSION_SPEED</a>&#160;</td>
          <td class="paramname"><em>speed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the conversion speed (changes the <a class="el" href="class_a_d_c.html">ADC</a> clock, ADCK) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">speed</td><td>can be any from the <a class="el" href="namespace_a_d_c__settings.html#aab853fc1fcb1992fd5d51408adf7688e">ADC_CONVERSION_SPEED</a> enum. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00431">431</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a784d946712d1d0ee475822b7b8f99ace"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a784d946712d1d0ee475822b7b8f99ace">&#9670;&nbsp;</a></span>setReference()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setReference </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_a_d_c__settings.html#a5f42fd9e070e88475ec7cee39bbf4f8d">ADC_REFERENCE</a>&#160;</td>
          <td class="paramname"><em>ref_type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the voltage reference you prefer, default is vcc. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ref_type</td><td>any of the <a class="el" href="namespace_a_d_c__settings.html#a5f42fd9e070e88475ec7cee39bbf4f8d">ADC_REFERENCE</a> enum.</td></tr>
  </table>
  </dd>
</dl>
<p>It recalibrates at the end. </p>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00258">258</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a6bd8da02e5e9bd3b2b3db30d5faa3585"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bd8da02e5e9bd3b2b3db30d5faa3585">&#9670;&nbsp;</a></span>setResolution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setResolution </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>bits</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change the resolution of the measurement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bits</td><td>is the number of bits of resolution.<ul>
<li>For single-ended measurements: 8, 10, 12 or 16 bits.</li>
<li>For differential measurements: 9, 11, 13 or 16 bits. If you want something in between (11 bits single-ended for example) select the immediate higher and shift the result one to the right.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<p>Whenever you change the resolution, change also the comparison values (if you use them). </p>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00312">312</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a2aa4693c5be479f3189d31f59d212509"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2aa4693c5be479f3189d31f59d212509">&#9670;&nbsp;</a></span>setSamplingSpeed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::setSamplingSpeed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_a_d_c__settings.html#af0d80a1aae7288f77b13f0e01d9da0d3">ADC_SAMPLING_SPEED</a>&#160;</td>
          <td class="paramname"><em>speed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the sampling speed. </p>
<p>Increase the sampling speed for low impedance sources, decrease it for higher impedance ones. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">speed</td><td>can be any of the <a class="el" href="namespace_a_d_c__settings.html#af0d80a1aae7288f77b13f0e01d9da0d3">ADC_SAMPLING_SPEED</a> enum. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l00583">583</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a2b6284a613c9d3e452d2fc708bf6ce98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b6284a613c9d3e452d2fc708bf6ce98">&#9670;&nbsp;</a></span>startContinuous()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::startContinuous </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts continuous conversion on the pin. </p>
<p>It returns as soon as the <a class="el" href="class_a_d_c.html">ADC</a> is set, use <a class="el" href="class_a_d_c___module.html#a8bddd248a9d52110b923fa94438f7f0a">analogReadContinuous()</a> to read the value. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>can be any of the analog pins </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the pin is valid, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01365">1365</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a23fd4fa6b759dcc0c029b3266f6a5fb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23fd4fa6b759dcc0c029b3266f6a5fb7">&#9670;&nbsp;</a></span>startContinuousDifferential()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::startContinuousDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts continuous conversion between the pins (pinP-pinN). </p>
<p>It returns as soon as the <a class="el" href="class_a_d_c.html">ADC</a> is set, use <a class="el" href="class_a_d_c___module.html#a8bddd248a9d52110b923fa94438f7f0a">analogReadContinuous()</a> to read the value. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the pins are valid, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01395">1395</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="aa503b484e691fe31172033fc928576bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa503b484e691fe31172033fc928576bd">&#9670;&nbsp;</a></span>startDifferentialFast()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::startDifferentialFast </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts a differential conversion on the pair of pins. </p>
<p>It sets the mux correctly, doesn't do any of the checks on the pin and doesn't change the continuous conversion bit. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>positive pin to read. </td></tr>
    <tr><td class="paramname">pinN</td><td>negative pin to read. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01065">1065</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="acced2e2266868323ff2c53df96791a15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acced2e2266868323ff2c53df96791a15">&#9670;&nbsp;</a></span>startPDB()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::startPDB </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>freq</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start PDB triggering the <a class="el" href="class_a_d_c.html">ADC</a> at the frequency. </p>
<p>Call startSingleRead or startSingleDifferential on the pin that you want to measure before calling this function. See the example adc_pdb.ino. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">freq</td><td>is the frequency of the <a class="el" href="class_a_d_c.html">ADC</a> conversion, it can't be lower that 1 Hz </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01460">1460</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="a33cc7fbfcb158a33e8ca276cc7b309b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33cc7fbfcb158a33e8ca276cc7b309b5">&#9670;&nbsp;</a></span>startReadFast()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::startReadFast </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts a single-ended conversion on the pin. </p>
<p>It sets the mux correctly, doesn't do any of the checks on the pin and doesn't change the continuous conversion bit. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>to read. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01032">1032</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="abe85ed1855a09f18c5d2026cf08968a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe85ed1855a09f18c5d2026cf08968a7">&#9670;&nbsp;</a></span>startSingleDifferential()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::startSingleDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start a differential conversion between two pins (pinP - pinN) It returns immediately, get value with <a class="el" href="class_a_d_c___module.html#a60d0edc82fd1dbb2e20d090a53718ce2">readSingle()</a>. If this function interrupts a measurement, it stores the settings in adc_config. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the pins are valid, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01316">1316</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="af8a13facb0c15ef14e527a37f2386ce5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8a13facb0c15ef14e527a37f2386ce5">&#9670;&nbsp;</a></span>startSingleRead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC_Module::startSingleRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts an analog measurement on the pin. It returns immediately, get value with <a class="el" href="class_a_d_c___module.html#a60d0edc82fd1dbb2e20d090a53718ce2">readSingle()</a>. If this function interrupts a measurement, it stores the settings in adc_config. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>pin to read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the pin is valid, false otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8cpp_source.html#l01277">1277</a> of file <a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a>.</p>

</div>
</div>
<a id="aebdd7b54f91fe0834321fb632177151e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebdd7b54f91fe0834321fb632177151e">&#9670;&nbsp;</a></span>startTimer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Module::startTimer </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>freq</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Start the default timer (PDB) triggering the <a class="el" href="class_a_d_c.html">ADC</a> at the frequency. </p>
<p>The default timer in this board is the PDB, you can also call it directly with <a class="el" href="class_a_d_c___module.html#acced2e2266868323ff2c53df96791a15" title="Start PDB triggering the ADC at the frequency.">startPDB()</a>. Call startSingleRead or startSingleDifferential on the pin that you want to measure before calling this function. See the example adc_pdb.ino.</p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">freq</td><td>is the frequency of the <a class="el" href="class_a_d_c.html">ADC</a> conversion, it can't be lower that 1 Hz </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00598">598</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="afcb1d826e94dad49e376bf3fe0334c39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcb1d826e94dad49e376bf3fe0334c39">&#9670;&nbsp;</a></span>adc_config</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="struct_a_d_c___module_1_1_a_d_c___config.html">ADC_Module::ADC_Config</a> ADC_Module::adc_config</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Struct with all relevant <a class="el" href="class_a_d_c.html">ADC</a> configs. </p>

</div>
</div>
<a id="a2d0cc3360073881658e578faf4ae5632"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d0cc3360073881658e578faf4ae5632">&#9670;&nbsp;</a></span>fail_flag</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile ADC_ERROR ADC_Module::fail_flag</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This flag indicates that some kind of error took place. </p>
<p>Use the defines at the beginning of this file to find out what caused the fail. </p>

<p class="definition">Definition at line <a class="el" href="_a_d_c___module_8h_source.html#l00736">736</a> of file <a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_a_d_c___module_8h_source.html">ADC_Module.h</a></li>
<li><a class="el" href="_a_d_c___module_8cpp_source.html">ADC_Module.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_a_d_c___module.html">ADC_Module</a></li>
    <li class="footer">Generated on Tue Nov 29 2022 23:16:23 for ADC by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
